#################################################
#	This file is program's makefile
#	You can use 'make' command to make this program.
#	Or you can use 'mak clean' to remove useless file.
#################################################

#cross_compile_tools
#CC=gcc
CC=arm-linux-gnueabihf-gcc

#compile message
CFLAGS = -Wall

#user application function
USER_APP_FUNC=change_screen

obj=main.o thread_one.o thread_two.o system_init.o global.o signal_process_func.o verity_func.o
$(USER_APP_FUNC):$(obj)
	$(CC) $(CFLAGS) $(obj) -lpthread -O2 -o $@

main.o:main.c  include.h
	$(CC) $(CFLAGS)  -c main.c

thread_one.o:thread_one.c include.h
	$(CC) $(CFLAGS) -c thread_one.c

thread_two.o:thread_two.c  include.h
	$(CC) $(CFLAGS) -c thread_two.c

system_init.o:system_init.c  include.h
	$(CC) $(CFLAGS) -c system_init.c

global.o:global.c  include.h
	$(CC) $(CFLAGS) -c global.c

signal_process_func.o:signal_process_func.c   include.h
	$(CC) $(CFLAGS) -c signal_process_func.c

verity_func.o:verity_func.c   include.h
	$(CC) $(CFLAGS) -c verity_func.c

.PHONY : clean
clean:
	rm -f $(USER_APP_FUNC) *.o
